package com.container.demo;

import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;

public class TreepTest {
    public static void main(String[] args) {
        Map<String,Object> map = new TreeMap<>();
        map.put("5",6);
        map.put("1",2);
        System.out.println(map);

        //TreeMap不允许key为空、允许value值为空
        map.put("2",null);
        System.out.println(map);
    }
}
